//
//  Header.h
//  one_buy_guizhou_ios
//
//  Created by 杨帅 on 2020/7/27.
//  Copyright © 2020 杨帅. All rights reserved.
//

#ifndef Header_h
#define Header_h

#define CHECKCODE @"https://cybapp.gcongo.com.cn/api/truckrorder/open/cybOrderValidation/checkCode"

// 获取定位信息
#define USDK_WEBKIT_ACTION_PAY @"USDKActionPay"
#define USDK_WEBKIT_PAY_RESULT @"USDKPayResult"
#define USDK_WEBKIT_CLOSE_WINDOWS @"USDKCloseWindows"

// 自定义UA
#define CUSTOM_USER_AGENT @"@pyramid-kit/mobile-eco/ios"

// 屏幕信息
#define TABBAR_HEIGHT kiPhoneXAll ? 83 : 49
#define BOTTOM_HEIGHT kiPhoneXAll ? 34 : 0
#define Screen_Width [UIScreen mainScreen].bounds.size.width
#define Screen_Height [UIScreen mainScreen].bounds.size.height
#define StatusBarHeihgt (kiPhoneX_Top_Height + 64)
#define NAVBAR_HEIHGT 44
#define iPhone6P (kSLScreenH == 736)
#define iPhone6 (kSLScreenH == 667)
#define iPhone5 (kSLScreenH == 568)
#define iPhone4 (kSLScreenH == 480)
#define iPhoneX ([UIScreen instancesRespondToSelector:@selector(currentMode)] ? CGSizeEqualToSize(CGSizeMake(1125, 2436), [[UIScreen mainScreen] currentMode].size) : NO)
#define iPhoneXR ([UIScreen instancesRespondToSelector:@selector(currentMode)] ? CGSizeEqualToSize(CGSizeMake(828, 1792), [[UIScreen mainScreen] currentMode].size) : NO)
#define iPhoneXS_Max ([UIScreen instancesRespondToSelector:@selector(currentMode)] ? CGSizeEqualToSize(CGSizeMake(1242, 2688), [[UIScreen mainScreen] currentMode].size) : NO)
#define IsiPhone11 ([UIScreen instancesRespondToSelector:@selector(currentMode)] ? CGSizeEqualToSize(CGSizeMake(828, 1792), [[UIScreen mainScreen] currentMode].size) : NO)
#define IsiPhone11Pro ([UIScreen instancesRespondToSelector:@selector(currentMode)] ? CGSizeEqualToSize(CGSizeMake(1125, 2436), [[UIScreen mainScreen] currentMode].size) : NO)
#define IsiPhone11ProMax ([UIScreen instancesRespondToSelector:@selector(currentMode)] ? CGSizeEqualToSize(CGSizeMake(1242, 2688), [[UIScreen mainScreen] currentMode].size) : NO)
/**
 * iPhoneX全系导航栏增加高度 (64->88)
 */
#define kiPhoneX_Top_Height (([UIScreen mainScreen].bounds.size.height == 812 || [UIScreen mainScreen].bounds.size.height == 896)?24:0)

/**
 * iPhoneX全系TabBar增加高度 (49->83)
 */
#define kiPhoneX_Bottom_Height  (([UIScreen mainScreen].bounds.size.height == 812 || [UIScreen mainScreen].bounds.size.height == 896)?34:0)
/**
 * 屏幕适配--异面屏全系
 */
#define kiPhoneXAll (iPhoneX || iPhoneXR || iPhoneXS_Max || IsiPhone11 || IsiPhone11Pro || IsiPhone11ProMax)

#define WEAKSELF typeof(self) __weak weakSelf = self;

#endif /* Header_h */
